#include <iostream>

using namespace std;

int main()
{
    int app[11];
    for (int i=1; i<=10; ++i)
    {
        cin >> app[i];
    }
    int hei;
    cin >> hei;
    hei += 30;
    int ans = 0;
    for (int i=1; i<=10; ++i)
    {
        if (hei >= app[i]) ++ans;
    }
    cout << ans;
    return 0;
}
